package com.csdig.cms.service;

import java.util.List;

import com.csdig.cms.model.Content;
import com.csdig.cms.model.ContentTxt;
import com.csdig.cms.model.ext.ContentExt;
import com.csdig.db.model.Pagination;

public interface ContentService {

	public Pagination<Content> findAllByPid(Integer channelPid, int pageNum, int pagSize) throws Exception;

	public Integer saveContent(Content bean, String content) throws Exception;

	public Content findById(Integer id) throws Exception;

	public ContentTxt findTxtById(Integer id) throws Exception;

	public void updateContent(Content bean, String content) throws Exception;

	// 删除
	public void del(Integer contentId) throws Exception;

	// ////for front page
	public Content findByPath(String path) throws Exception;

	/**
	 * for tags
	 * 
	 * @param channelIds
	 *            栏目编号
	 * @param hasChild
	 *            是否显示子栏目内容，默认不显示
	 * @param first
	 *            第一条
	 * @param count
	 *            数量
	 * @param orderBy
	 *            排序
	 * @return
	 */
	public List<ContentExt> getListByIdsForTag(Integer channelId, int first, int count, String orderBy)
			throws Exception;
	//分页查询
	public Pagination<ContentExt> getPagByIdsForTag(Integer channelIds, int pageNo, String orderBy)throws Exception;

}
